# Contributor: Dhruvin Gandhi <contact@dhruvin.dev>
# Maintainer: Dhruvin Gandhi <contact@dhruvin.dev>
pkgname=py3-sphinx-click
_pyname=sphinx-click
pkgver=5.1.0
pkgrel=1
pkgdesc="Sphinx plugin to extract documentation from click-based applications"
url="https://github.com/click-contrib/sphinx-click"
arch="noarch"
license="MIT"
depends="python3 py3-sphinx py3-click py3-docutils"
makedepends="py3-gpep517 py3-pbr py3-setuptools py3-wheel"
checkdepends="py3-pytest py3-click py3-coverage"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
builddir="$srcdir/$_pyname-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	pytest
}

package() {
	python3 -m installer -d "$pkgdir" .dist/*.whl
}

sha512sums="
56039e1835549d653eed513b1fb7a90e9fed47beb39f47a2483c6d60d48394f37ea835817af46487f221510297ef7fe9de341b3c4928552c0ec3a853251faadf  sphinx-click-5.1.0.tar.gz
"
